package game.actor
{
	import away3d.containers.*;
	import engine.core.*;
	import engine.math.*;
	import game.*;
	import game.asset.*;
	import game.core.*;
	import game.messages.simulation.*;
	import game.network.*;
	import game.scene.*;
	
	public class RxController
	{
		private var m_controllerName:String;
		private var m_state:String;
		private var m_debounce:Boolean;
		private var m_envNav:Boolean;
		private var m_targetNav:Boolean;
		public var m_action:int;
		public var m_hold:int;
		public var m_node:int;
		public var m_mousePos3D:RxVector4;
		public var m_actor:RxActor;
		public var m_item:RxActor;
		public var m_ability:String;
		public var m_abilityIndex:int;
		public var m_held:int;
		private var m_clicked:int;
		private var m_gameCamera:RxGameCamera;
		private var m_doBot:Boolean;
		private var m_botTimer:Number;
		private var m_botTarget:RxActor;
		private var m_botTargetPath:Array;
		private var m_botTargetPathIndex:int;
		private var m_botHistory:Object;
		private var m_botConsumablesTimer:Number;
		private var m_cursorDeadZoneStartSqr:Number;
		private var m_cursorDeadZoneActiveSqr:Number;
		private var m_controlValues:ControlValues;
		
		public function RxController(controllerName:String, gameCamera:RxGameCamera)
		{
			this.m_controllerName = controllerName;
			this.m_action = 0;
			this.m_hold = 0;
			this.m_node = -1;
			this.m_mousePos3D = RxVector4.PoolAlloc();
			this.m_actor = null;
			this.m_debounce = false;
			this.m_envNav = false;
			this.m_targetNav = false;
			this.m_held = 0;
			this.m_clicked = 0;
			this.m_gameCamera = gameCamera;
			this.m_doBot = RxMain.IsAutomated();
			this.m_botTimer = 10;
			this.m_botTarget = null;
			this.m_botTargetPath = null;
			this.m_botTargetPathIndex = 0;
			this.m_botHistory = new Object();
			this.m_botConsumablesTimer = 0;
			var start:* = RxClientVars.GetNumber("cursorDeadZoneStart");
			var active:* = RxClientVars.GetNumber("cursorDeadZoneActive");
			this.m_cursorDeadZoneStartSqr = start * start;
			this.m_cursorDeadZoneActiveSqr = active * active;
			this.m_controlValues = new ControlValues(true, true);
		}
	}
}

class ControlValues extends Object
{
	public var doUpdate:Boolean;
	public var doRespond:Boolean;
	
	public function ControlValues(Update:Boolean, Respond:Boolean) : void
	{
		this.doUpdate = Update;
		this.doRespond = Respond;
	}
	
}